#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<unordered_set>
using namespace std;

unordered_set<int> s;

int main() {
	int n; cin >> n;
	while (n--) {
		int c, x; cin >> c >> x;
		if (c == 1) s.insert(x);
		else {
			s.count(x) ? puts("Yes") : puts("NO");
		}
	}
	return 0;
}